<template>
  <div class="bill_info_edit">
    <van-nav-bar
      :title="title"
      left-arrow
      @click-left="onClickLeft"/>
    <div id="jobInfo" style="margin-top: 10px">
      <van-cell-group>
        <van-cell title="账号类型" :value=billInfo.accTyp />
      </van-cell-group>
      <div style="height: 10PX"></div>
      <van-cell-group>
        <van-cell title="时间" :value=billInfo.accDate />
        <van-cell title="账号" :value='billInfo.accNo | account' />
        <van-cell title="户名" :value=billInfo.accNm />
        <van-cell title="余额" :value='billInfo.accAmt | account' />
        <van-cell title="币种" :value=billInfo.accCur />
      </van-cell-group>
      <div style="height: 10PX"></div>
      <van-cell-group>
        <van-cell title="状态" :value=billInfo.statue  />
      </van-cell-group>
    </div>
    <div id="btn_op" class="btn_op">
      <span class="let_btn">
        <van-button @click="onClickRefuse" color="#C7E0EE">不相符</van-button>
      </span>
      <span style="margin-left: 20px">
        <van-button @click="onClickAccept" color="linear-gradient(to right, #20B1F2, #1393D3)">相符
        </van-button>
      </span>
    </div>
  </div>
</template>

<script>
import {
  CellGroup,
} from 'vant';

export default {
  components: {
    [CellGroup.name]: CellGroup,
  },
  data() {
    return {
      title: '',
      billInfo: {
        accTyp: '对公活期',
        accDate: '2020-08',
        accNm: '上海新晨信息集成系统有限公司',
        accNo: '6355555521482',
        accAmt: '20000000',
        statue: '未对账',
        accCur: '人民币',
      },
    };
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
    onClickAccept() {
      this.$router.go(-1);
    },
    onClickRefuse() {
      this.$router.push('AddBillInfo');
    },
  },
  created() {
    if (this.$store.state.yqdzTitle) {
      this.title = '未完成对账';
    } else {
      this.title = '已完成对账';
    }
  },
};
</script>

<style lang="less">
.bill_info_edit {
  background-color: #f3f6f9;
  height: 100vh;

  .van-cell__value {
    min-width: 70%;
  }
  .van-cell__value span {
    display: inline-block;
    text-align: left;
    word-break: break-all;
  }
  .btn_op{
    text-align: center;
    margin-top: 50px;
  }
  .btn_op button{
    width: 100pt;
  }
  .let_btn{
    margin-right: 20px
  }
  .let_btn button div span{
    color: black;
  }
}
</style>
